
<table class="table table-bordered">
    <thead>
    <tr>
        <th style="width: 50px;">序号</th>
        <th>回复者</th>
        <th>回复内容</th>
        <th>回复时间</th>
        <th>操作</th>
    </tr>
    </thead>
    <tbody>
    {volist name='data' id='d'}
    <tr>
        <td>{$key+1}</td>
        <td>
            {if $d.reply_name}
            <span style="color:gray;">{$d.reply_name}</span>&nbsp;&nbsp;回复&nbsp;&nbsp;
            {/if}
            <span style="color:gray;">{$d.one_name}</span>
        </td>
        <td>{$d.comtt_content}</td>
        <td>{$d.comtt_time}</td>
        <td><a href="JavaScript:;" name="{$d.comtt_id}" id="comtt{$d.comtt_id}" class="delcmtt">删除</a></td>
    </tr>
    {/volist}
    </tbody>
</table>
<script>
    $('.delcmtt').click(function () {
        var ttid = $(this).attr('name');
            if(confirm('确认删除此回复吗？')){
                $.ajax({
                    url: 'admin/User/delcomtt',
                    data: 'ttid=' + ttid,
                    type: 'POST',
                    dataType: 'JSON',
                    success: function (returnData) {
                        if (returnData.status == 0) {
                            layer.msg(returnData.msg,{icon:5,time:1000});
                        } else {
                            $('#comtt'+ttid).parent().parent().remove();
                            layer.msg(returnData.msg,{icon:6,time:1000});
                        }
                    },
                    error: function () {
                        $.TeachDialog({
                            content: '系统异常，请联系管理员',
                        });
                    }
                });
            }
    });
</script>